package com.bindapp.activity;

import android.os.Handler;
import android.os.Message;

import com.bindapp.listener.LoadStatusListener;
import com.bindapp.model.EzlistModel;

/**
 * Created by tom055 on 2018/6/24.
 */

public class EzListActivity extends BaseActivity {
    private EzlistModel model;
    private Handler handler=new Handler(){
        @Override
        public void handleMessage(Message msg) {
            AddContentView(model.getBinding().getRoot());
        }
    };

    @Override
    protected void after() {
        super.after();
        model=new EzlistModel(EzListActivity.this,new LoadImpl());
        model.requestToken();
        //App.getOpenSDK().getEZAccessToken();
    }

    class LoadImpl implements LoadStatusListener {

        @Override
        public void show() {
            handler.sendMessageDelayed(new Message(),3000);
        }

        @Override
        public void hide(boolean flag, String msg) {
            loadLayoutModel.setLoadStatus(flag, msg, 0);
            AddContentView(loadLayoutModel.getBinding().getRoot());
        }
    }
}
